import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";

var _class;

/**
 * index.js
 * 用于在页面上使用
 * @date 2018-12-10

 */
import React from 'react';
import { withRouter } from 'dva/router';
import DynamicPage from 'components/DynamicComponent/DynamicPage';

var PageCommon = withRouter(_class = /*#__PURE__*/function (_React$Component) {
  _inherits(PageCommon, _React$Component);

  var _super = _createSuper(PageCommon);

  function PageCommon() {
    _classCallCheck(this, PageCommon);

    return _super.apply(this, arguments);
  }

  _createClass(PageCommon, [{
    key: "render",
    value: function render() {
      var pageCode = this.props.match.params.pageCode;
      return /*#__PURE__*/React.createElement(DynamicPage, {
        pageCode: pageCode
      });
    }
  }]);

  return PageCommon;
}(React.Component)) || _class;

export { PageCommon as default };